package entity.domain.value;

import entity.domain.topic.Type;

public class DiscreteValue<T> extends Value {

    private int num;


    public DiscreteValue(){}

    public DiscreteValue(int num, T value){
        this.setValueType(Type.Discrete);
        this.num = num;
        this.setValue(value);
    }

    public DiscreteValue(int num, T value, String description){
        this.setValueType(Type.Discrete);
        this.num = num;
        this.setValue(value);
        this.setDescription(description);
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public boolean equals(DiscreteValue discreteValue) {
        return this.num == discreteValue.getNum();
    }
}
